package com.bigzero.workflow.common.model;

import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.userdetails.User;

import java.util.Collection;

/**
 * token信息
 *
 * @author fanxinxiong
 * @since 2025-02-10
 */
@Setter
@Getter
@ToString
public class TokenAuthInfo extends User{

    /**用户编码*/
    private String username;

    /**token*/
    private String token;

    /**是否是系统内置,1:是,0:否*/
    private Integer isSys;

    public TokenAuthInfo(String username, String password,
                         Collection<? extends GrantedAuthority> authorities) {
        super(username, password, authorities);
    }

    public TokenAuthInfo(String username, String password,
                         boolean enabled, boolean accountNonExpired,
                         boolean credentialsNonExpired, boolean accountNonLocked,
                         Collection<? extends GrantedAuthority> authorities) {
        super(username, password, enabled, accountNonExpired, credentialsNonExpired, accountNonLocked, authorities);
    }
}
